package com.hhq.sso.auth.base.util;

import com.hhq.sso.auth.base.pojo.SystemUserInfo;

/**
 * <p>
 * Description: some description
 * </p>
 *
 * @author : xiaodong.yang
 * @date : 2024/6/20 13:52
 */
public class SystemUserContext {

    private static final ThreadLocal<SystemUserInfo> threadLocal = new ThreadLocal<>();

    /**
     * 获取系统用户信息
     *
     * @return
     */
    public static SystemUserInfo getSystemUserInfo() {
        return threadLocal.get();
    }

    /**
     *
     * @param systemUserInfo
     */
    public static void setSystemUserInfo(SystemUserInfo systemUserInfo) {
        threadLocal.set(systemUserInfo);
    }

}
